<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="estilo/style.css" />
	 <script language="JavaScript" type="text/javascript">	
           function mostrar_contrato(fac,con,tpc){
               if(tpc=='PYME'){
             	  window.open("imprimircontrato_pyme.jsp?id="+con,'','left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes');
               }else{
             	  window.open("imprimircontrato_.jsp?id="+con,'','left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes');
               }
               window.open("comprobante.jsp?codigo="+fac,'','left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes');
           }
    </script>
</head>
<body>
<div id='resultado_gd_aprxss' >
<center><img id="indicatorc2" src="img/pg1.gif" alt="Cargando..." style="display: none" /></center>
<table width="100%">
<tr Height='10px' >
	<td width='25%' class='tabla_th1' >Cliente</td>
	<td width='10%' class='tabla_th1' >Contrato</td>
	<td width='10%' class='tabla_th1' >Vendedor</td>
	<td width='10%' class='tabla_th1' >Fecha</td>
	<td width='10%' class='tabla_th1' >Factura</td>
	<td width='10%' class='tabla_th1' >Control</td>
	<td width='10%' class='tabla_th1' >Estatus</td>
	<td width='10%' class='tabla_th1' >Sucursal</td>
	<td width='10%' class='tabla_th1' >Pendiente</td>
	<td width='10%' class='tabla_th1' >Total</td>    
</tr>
<s:iterator var="outer2" status="i_status" value="rpt_lista" >
	 <tr Height='10px'  class='<s:property value="#outer2.stylo" />' >
		   <td width='25%'  >
		         <s:property value="#outer2.cliente" />   
		   </td>
		   <td width='10%'  >
		       <s:set name="var0" ><s:property value="status" /></s:set>
		       <s:if test="%{#var0==0}">
		          <s:property value="#outer2.contrato" />
		       </s:if> 
		       <s:else>
		           <a href="#" title='<s:property value="#outer2.contrato" />' id='url_hist'  onclick="javascript:mostrar_contrato('<s:property value="cod_factura" />','<s:property value="contrato" />','<s:property value="tipo" />')"  >
				  	  <s:property value="#outer2.contrato" />
				   </a>
		       </s:else> 
		   </td>
		   <td width='10%'   >
			    <s:property value="#outer2.vendedor" />
		   </td>
		   <td width='10%' >
		      <s:property value="#outer2.fecha" />
		   </td>
		   <td width='10%'  >
			    <s:property value="#outer2.factura" />
		   </td>
		   <td width='10%'  >
		      <s:property value="#outer2.control" /> 
		   </td>
		   <td width='10%'  >
		      <s:property value="#outer2.des_status" /> 
		   </td>
		   <td width='10%'  >
		      <s:property value="#outer2.sucursal" /> 
		   </td>
		   <td width='10%' align='right' >
		      <s:property value="#outer2.saldo" /> 
		   </td>
		   <td width='10%' align='right' >
		      <s:property value="#outer2.total" /> 
		   </td>
	     </tr>
</s:iterator>
 </table>
 <table  width='100%' >
      <tr Height='10px' >
	    <td width='100%' colspan='6' class='tabla_th1' >&nbsp;</td>
      </tr>
      <tr Height='10px' >
            <td width='50%' colspan='3'  >&nbsp;</td>
			<td width='20%' class='tabla_th1' >Total Pendiente:</td>
			<td width='20%' class='tabla_th2' ><s:property value="tt_saldo" /></td>
			<td width='10%'  class='tabla_th1'  >&nbsp;</td>
      </tr>
      <tr Height='10px' >
            <td width='50%' colspan='3'  >&nbsp;</td>
			<td width='20%' class='tabla_th1' >Total Ventas:</td>
			<td width='20%' class='tabla_th2' ><s:property value="tt_facturado" /></td>
			 <td width='10%' class='tabla_th1' >  &nbsp; </td>
     </tr>
 </table>
</div>
</body>
</html>
